package com.city.itis.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.city.itis.dao.SiteCategoryDao;
import com.city.itis.domain.SiteCategory;
import com.city.itis.service.SiteCategoryService;

/**
 * 站点类别业务层实现类
 * @author WY
 *
 */

@Component("siteCategoryService")
public class SiteCategoryServiceImpl implements SiteCategoryService 
{
	
	private SiteCategoryDao siteCategoryDao;
	

	public SiteCategoryDao getSiteCategoryDao() 
	{
		return siteCategoryDao;
	}
	@Resource
	public void setSiteCategoryDao(SiteCategoryDao siteCategoryDao) 
	{
		this.siteCategoryDao = siteCategoryDao;
	}

	@Override
	public int add(SiteCategory siteCategory)
	{
		return siteCategoryDao.save(siteCategory);
	}

	@Override
	public int delete(SiteCategory siteCategory)
	{
		return siteCategoryDao.delete(siteCategory);
	}

	@Override
	public int deleteById(Integer id)
	{
		return siteCategoryDao.deleteById(id);
	}

	@Override
	public int modify(SiteCategory siteCategory) 
	{
		return siteCategoryDao.update(siteCategory);
	}

	@Override
	public SiteCategory getSiteCategoryById(Integer id)
	{
		return siteCategoryDao.getSiteCategoryById(id);
	}
	@Override
	public SiteCategory getSiteCategoryBySiteCategoryName(String categoryName) 
	{
		return this.siteCategoryDao.getSiteCategoryBySiteCategoryName(categoryName);
	}

	@Override
	public List<SiteCategory> findAll() 
	{
		return siteCategoryDao.findAll();
	}

	
}
